Proxies help hibernate implement other features, like lazy loading 代理幫助hibernate實(shí)現(xiàn)一些其他的特性,比如懶散加載(lazyloading)。
For example, kodo jdo has far better error messages and more predictable behavior around some of the edge cases, like managing lazy loading 例如,對(duì)于一些邊緣情況,比如管理懶散加載,kodojdo有非常好的錯(cuò)誤信息和更加可預(yù)測(cè)的行為。
What we will try to accomplish here is to create unique interface for traversing arrays and to add a little more control over how our objects are created and finally, to support lazy loading 我們要在這里試著完成的是為遍歷數(shù)組和在如何創(chuàng)建對(duì)象上加入一點(diǎn)額外的控制去創(chuàng)建一個(gè)唯一的接口,最后去支持傻瓜式的讀取。
With the lazy load improvements, data for each page is read when the page is accessed, avoiding performance degradation, and greatly increasing the number of pages that a single portal can host 借助延遲加載改進(jìn)功能,每個(gè)頁(yè)面的數(shù)據(jù)均在訪問該頁(yè)面時(shí)加載,從而避免了性能下降,并大幅度增加了單個(gè)門戶中可以駐留的頁(yè)面的數(shù)量。